package com.smedi.ismedi.notification.core.domain.service.impl;

import com.smedi.ismedi.notification.core.domain.aggregatemodel.SmsLog;
import com.smedi.ismedi.notification.core.domain.repository.SmsLogRepository;
import com.smedi.ismedi.notification.core.domain.service.SmsLogDomainService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: xulinjun
 * @Date: 2021-7-12 14:59
 */
@Slf4j
@Service
@AllArgsConstructor
public class SmsLogDomainServiceImpl implements SmsLogDomainService {
    private final SmsLogRepository smsLogRepository;

    @Override
    public void batchSaveSmsLogs(List<SmsLog> list) {
        for (SmsLog smsLog : list) {
            smsLogRepository.doInsert(smsLog);
        }
    }
}
